home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10099 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: lrz-muenchen.de!news
  2. From: watzka@stat.uni-muenchen.de (Kurt Watzka)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: compilers
  5. Date: 15 Mar 1996 17:04:00 GMT
  6. Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
  7. Distribution: world
  8. Message-ID: <4ic7u0$d1q@sparcserver.lrz-muenchen.de>
  9. References: <4iburm$aps@airdmhor.gen.nz>
  10. NNTP-Posting-Host: sun2.lrz-muenchen.de
  11.  
  12. gumboot@airdmhor.gen.nz (Simon Hosie) writes:
  13.  
  14. >  Does anyone know of a compiler that can take
  15.  
  16. >for (;;)
  17. >{
  18. >    Stuff(1);
  19. >    if (Cond)
  20. >        break;
  21. >    Stuff(2);
  22. >}
  23.  
  24. >  and make
  25.  
  26. >goto EntryPoint;
  27. >do
  28. >{
  29. >    Stuff(2);
  30. >EntryPoint:
  31. >    Stuff(1);
  32. >} while (Cond);
  33.  
  34. Are you talking about a compiler that changes your _sources_ to other
  35. sources that it would compile to the same code, but that is less 
  36. maintainable and less readable? Who would want to install such a
  37. compiler? The whole loop could easily be written in a lot of different
  38. ways, so what would be the use of a compiler that that generatres
  39. one of the worst possible ways of expressing a certain control flow?
  40.  
  41. Have a look at CFront. It generates the kind of code yo seem to
  42. like as output.
  43.  
  44. Kurt 
  45. --
  46. | Kurt Watzka                             Phone : +49-89-2180-6254
  47. | watzka@stat.uni-muenchen.de
  48. | ua302aa@sunmail.lrz-muenchen.de
  49.  
  50.